#!/bin/bash 
# 查看用户存在与否和用户目录存在与否
# 
testuser=air

if grep $testuser /etc/passwd
then
    echo "The user $testuser is exists on this system"
elif ls -d /home/$testuser
then
    echo "The user $testuser is doesn't on this system"
    echo "However $testuser have a directory"
else
    echo "The user $testuser is doesn't on this system"
    echo "And $testuser doesn't have a directory"
fi      